
function getList(){
	var p=getQ()
	var data=JSON.parse(p.data)
	document.getElementById("name").textContent=data.class_name+"班习题作业"
	document.getElementById("class_number").textContent="班级编号："+data.class_number
	document.getElementById("title").textContent="习题作业名称："+data.name
	jQuery.ajax({
		"url":"/view_student_xiti_status/",
		"error":errorAjax,
		"beforeSend":start_load_pic,
		"complete":stop_load_pic,
		"data":{"ti_id":p.ti_id},
		"dataType":"jsonp",
		"success":function(data){
			if(!data.status){
				showErrorInfo(data.content);
				return false;
			}
			else{
				data=data.content
				var tab=document.getElementById("tab");
				for(var i=0;i<data.length;i++){
					var tr=document.createElement("tr")
					var td=document.createElement("td")
					td.textContent=data[i].student_chinese_name;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].student;
					tr.appendChild(td)
					

					var td=document.createElement("td")
					td.textContent=data[i].score;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].status;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					td.textContent=data[i].complete_date;
					tr.appendChild(td)
					
					var td=document.createElement("td")
					var button=document.createElement("button")
					button.className="btn btn-xs btn-primary"
					button.textContent="查看详情"
					button.setAttribute("inventory",JSON.stringify(data[i].inventory_id))
					button.setAttribute("name",data[i].name)
					button.setAttribute("student",data[i].student)
					button.onclick=function(){
						var t=getQ().data
						var name =JSON.parse(t).name
						var student=this.getAttribute("student")
						var inventory=this.getAttribute("inventory")
						var ti_id=getQ().ti_id
						window.open ("ti.html?action=audit&s="+inventory+"&name="+name+"&student="+student+"&ti_id="+ti_id, "_blank", "height=800, width=1300, top=160, left=200, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
					}

					td.appendChild(button)
					var button=document.createElement("button")
					button.className="btn btn-xs btn-warning"
					button.textContent="评价"
					button.style.marginLeft="5px"
					button.setAttribute("comment",data[i].comment)
					button.setAttribute("student_username",data[i].student)
					button.onclick=function(){
						var comment=this.getAttribute("comment")
						var ti_id=getQ().ti_id
						var student_username=this.getAttribute("student_username")
        					window.open ("comment.html?type=xiti&model=e&id="+ti_id+"&student_username="+student_username, "_blank", "height=700, width=1100, top=160, left=200, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=no");
				
					}
					td.appendChild(button)
				
					
				
					tr.appendChild(td)
					

					tab.appendChild(tr)

				}
			}
		}
	})
}

getList()
